<template>
  <div class="box">

    <RenderTable 
      ref="renderTable"
      :superQueryFieldList="superQueryFieldList" 
      :queryParamArr = "queryParamArr"
      :defaultQueryParam = "defaultQueryParam"
      :defColumns="defColumns"
      :url = "url"
      @handleEdit = "handleEdit"
    >
    </RenderTable>


  </div>
</template>

<script type="text/javascript">

import RenderTable from '@/components/renderTable'

const superQueryFieldList =
[
  {
    value: "organization",
    text: "组织",
    type: "String",
  },  
  {
    value: "empname",
    text: "员工姓名",
    type: "String",
  },
]
export default {
  props: {
    classno: String,
  },
  data() {
    return {
      superQueryFieldList,
      queryParamArr: [
        {
          label: "",
          placeholder: "请输入班组编码/班组名称",
          type: 'input',
          key: 'keyword',
          value: ''
        },

      ],
      defColumns: [
        {
          title: "序号",
          dataIndex: "",
          key: "rowIndex",
          width: 60,
          align: "center",
          customRender: (t, r, index) => {
            return parseInt(index) + 1;
          },
        },
        {
          title: "员工编号",
          align: "center",
          dataIndex: "empno",
        },
        {
          title: "员工姓名",
          align: "center",
          dataIndex: "empname",
        },
        {
          title: "性别",
          align: "center",
          dataIndex: "empsex",
        },
        {
          title: "入职日期",
          align: "center",
          dataIndex: "registerdt",
        },

      ],
      defaultQueryParam: {

      },
      url: {
        list: '/mes-manpower/mesHrEmployeeinfo/listByClassno',  // 根据班组编码分页获取人员信息表列表
      },
    
      layout: {
        labelCol: { span: 4 },
        wrapperCol: { span: 14 },
      },         
    }
  },
  watch: {
    classno(newVal, oldVal){
      this.$set(this.defaultQueryParam, 'classno', newVal)
      this.$refs.renderTable.loadData(1)
    }
  },
  mounted() {

  },
  methods: {

  },
  components: {
    RenderTable,
  }
}
</script>

<style lang="less" scoped>
</style>

